import React from "react";
import ReactDOM from "react-dom/client";
import { HashRouter } from "react-router-dom";
import { Provider } from "react-redux";
import { persistStore } from "redux-persist";
import { PersistGate } from "redux-persist/integration/react";

import store from "./store";
import "./index.scss";
import App from "./App.jsx";

const root = ReactDOM.createRoot(document.querySelector("#root"));
root.render(
  <HashRouter>
    <Provider store={store}>
      <PersistGate persistor={persistStore(store)}>
        <App />
      </PersistGate>
    </Provider>
  </HashRouter>
);

// 测试一下环境变量能否取出来
console.log(process.env);

// import * as hello from "./hello";
// console.log(hello.age);
